package com.lvyq.myplayer.model.version

import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import com.lvyq.myplayer.model.index.IndexHotSongBean
import com.lvyq.myplayer.net.api.indexDailyPlayApiService
import com.lvyq.myplayer.net.api.singerApiService
import kotlinx.coroutines.launch

/**
 * 文件描述：UpVersionModel 歌手专辑
 * 作者：lvyq
 * 创建时间：2025-04-08
 * 修改时间：2025-04-08
 */
class UpVersionModel : ViewModel() {

    private val _data = MutableLiveData<UpVersionBean>()
    val data: LiveData<UpVersionBean> = _data



    fun checkVersion(version:String ){
        viewModelScope.launch {
            var response = indexDailyPlayApiService.checkVersion(version)
            if (response.isSuccessful){
                _data.value=response.body()
            }
        }
    }
}